package org.sq;

import org.osmdroid.views.MapView;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;

public class SQMapView extends MapView {

	public SQMapView(Context context, AttributeSet attrs) {
		super(context, attrs);
		
		this.setOnTouchListener(new OnTouchListener() {
		    @Override
		    public boolean onTouch(View v, MotionEvent event) {
		        switch (event.getAction()) {
		            case MotionEvent.ACTION_MOVE:
		            	SQMapView.this.getParent().requestDisallowInterceptTouchEvent(true);
		                break;
		            case MotionEvent.ACTION_UP:
		            case MotionEvent.ACTION_CANCEL:
		            	SQMapView.this.getParent().requestDisallowInterceptTouchEvent(false);
		                break;
		        }
		        return onTouchEvent(event);
		    }

		
		});
		
	}
	


}
